﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HHCommon;
namespace HHWeb.SystemManage
{
    public partial class Top : System.Web.UI.Page
    {
        Help help = new Help();
        EncAndDec EncAndDec = new EncAndDec();
        public string UserName = string.Empty;
        public string UserType = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                UserName = EncAndDec.DESDecrypting(help.GetCookie("UserName"));
                UserType = EncAndDec.DESDecrypting(help.GetCookie("UserType"))=="1"?"系统管理员":"普通管理员";
                if (help.GetHttpMethodBool())
                {
                    help.EmptyCookie("ID", SetCookieTime.Hours, 1);
                    help.EmptyCookie("UserNumber", SetCookieTime.Hours, 1);
                    help.EmptyCookie("UserName", SetCookieTime.Hours, 1);
                    help.EmptyCookie("UserCode", SetCookieTime.Hours, 1);
                    help.EmptyCookie("UserType", SetCookieTime.Hours, 1);
                    Response.Write("<script language =\"javascript\">window.open('/SystemManage/Login.aspx','_top')</script>");
                }
            }
            catch
            { 
            }
        }
    }
}